package com.tongji.service;

import com.bean.PanDian;
import com.bean.WmsTCrDetails;
import com.bean.WmsTCustomer;
import com.bean.WmsTStore;
import com.tongji.mapper.PandianMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PandianService {

    @Autowired
    PandianMapper pandianMapper;

    //ajax查询客户信息

    public List<WmsTCustomer> getCustomer(String name) {
        return pandianMapper.getCustomer(name);
    }

    //查询有东西的仓库信息
    public List<WmsTStore> getStore() {
        return pandianMapper.getStore();
    }

    //开始盘点
    public List<PanDian> getPanDian(@Param("custid") String custid, @Param("storeid") String storeid) {
        return pandianMapper.getPanDian(custid, storeid);
    }

    //判断数据是否存在[存在则不重复插入]
    public List<WmsTCrDetails> getWmsTCrDetails(WmsTCrDetails wmsTCrDetails) {
        return pandianMapper.getWmsTCrDetails(wmsTCrDetails);
    }

    //插入WmsTCrDetails
    public void insertWmsTCrDetails(WmsTCrDetails wmsTCrDetails) {
        pandianMapper.insertWmsTCrDetails(wmsTCrDetails);
    }


}
